{% extends 'ux_packages/package.html.twig' %}

{% block package_header %}
    {% component PackageHeader with {
        package: 'notify',
        eyebrowText: 'Native Browser Notifications'
    } %}
        {% block title_header %}
            Notify users from <em>inside PHP</em>
        {% endblock %}

        {% block sub_content %}
            Send real-time, native browser notifications to everyone via Symfony's Notifier Component.
        {% endblock %}
    {% endcomponent %}
{% endblock %}

{% block code_block_left %}
    <twig:CodeBlock filename="src/Controller/UxPackage/NotifyController.php" height="300px"/>
{% endblock %}

{% block code_block_right %}
    <twig:CodeBlock
        filename="templates/ux_packages/notify.html.twig"
        height="300px"
        targetTwigBlock="demo_content"
    />
{% endblock %}

{% block demo_title %}UX Notify{% endblock %}

{% block demo_content %}
    {{ stream_notifications(['/demo/notifier']) }}

    {{ form_start(form) }}
        {{ form_widget(form) }}

        <button type="submit" class="btn btn-primary">Send Notification</button>
    {{ form_end(form) }}
{% endblock %}
